package com.baizhi.controller;

import com.baizhi.dto.PageDTO;
import com.baizhi.service.CategroyService;
import com.baizhi.vo.CommonQueryPageVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@CrossOrigin
@RestController

public class CategoryController {

    private static final Logger log = LoggerFactory.getLogger(CategoryController.class);
    @Resource
    CategroyService categroyService;

    @PostMapping ("/category/queryOnePage")
    public CommonQueryPageVO queryOnePage(@RequestBody PageDTO pageDTO){

        log.info("接受的数据pageDTO:{}",pageDTO);

        return categroyService.queryOnePage(pageDTO);
    }

}
